<!-- -----------------------------------------------------------------
-
- Copyright (C) 2019 OSGeo
-
- This program is free software: you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation, either version 3 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program. If not, see <http://www.gnu.org/licenses/>.
-
---------------------------------------------------------------------- -->

{% load i18n avatar_tags %}
{% load static %}
{% load base_tags %}
{% load client_lib_tags %}
<!DOCTYPE html>
<html lang="en" class="{% block html_class %}{% endblock %}">
  <head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta Http-Equiv="Cache-Control" Content="no-cache">
    <meta Http-Equiv="Pragma" Content="no-cache">
    <meta Http-Equiv="Expires" Content="0">

    <title>{% block title %}{{ SITE_NAME }}{% endblock %}</title>

    <link rel="shortcut icon" href="{% static 'geonode/img/favicon.ico' %}" />
    <link rel="preload" as="style" href="{% static "geonode/css/font-awesome.min.css" %}" />
    <link rel="preload" as="font" href="{% static "geonode/fonts/lato_regular.ttf" %}" crossorigin="" />
    <link rel="preload" as="font" href="{% static "geonode/fonts/lato_bold.ttf" %}" crossorigin="" />
    <link rel="preload" as="font" href="{% static "geonode/fonts/lato_light.ttf" %}" crossorigin="" />

    {% block head %}
      <link href="{% static "geonode/css/base.css" %}" rel="stylesheet"/>
      <link rel='stylesheet' id='cookie-law-info-css'  href="{% static "geonode/css/cookie-law-info/cookie-law-info-public.css" %}" type='text/css' media='all' />
      <link rel='stylesheet' id='cookie-law-info-gdpr-css'  href="{% static "geonode/css/cookie-law-info/cookie-law-info-gdpr.css" %}" type='text/css' media='all' />
      <style type="text/css">[ng\:cloak],[ng-cloak],[data-ng-cloak],[x-ng-cloak],.ng-cloak,.x-ng-cloak,.ng-hide:not(.ng-hide-animate){display:none !important;}</style>
      
      {% block extra_head %}
      {% endblock %}
    {% endblock %}

    <link rel="search" type="application/opensearchdescription+xml" href="{% if SITEURL|default:""|slice:"-1:" == "/" %}{{SITEURL}}{% else %}{{SITEURL}}/{% endif %}catalogue/opensearch" title="{% trans "GeoNode Search" %}"/>

    <script>
        var siteUrl = '{{ SITEURL }}'.replace(/\/?$/, '/');
        var staticUrl = '{% static '' %}';
    </script>

    <!-- Autocomplete script for input boxes -->
    <script src="{% static "geonode/js/search/autocomplete.js" %}"></script>

    <!-- RTL styles -->
    {% get_current_language_bidi as LANGUAGE_BIDI %}
    {% if LANGUAGE_BIDI %}
        <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-rtl/3.3.4/css/bootstrap-rtl.min.css">
        <link rel="stylesheet" type="text/css" href="{% static "geonode/css/geonode-rtl.min.css" %}">
    {% endif %}
  </head>

  <body class="{% block body_class %}{% endblock %} {% block body_extra_class %}{% endblock %}">
    <!-- Loading Mask -->
    <div class='lmask'></div>
    
    <!-- This block is overriden by the mapstore client -->
    {% block header %}{% endblock header %}

  <div id="wrap">
    {% block middle %}
    <div class="container">
      {% include "_status_message.html" %}
      {% include "_announcements.html" %}
      {% include "_messages.html" %}
      {% block body_outer %}
      <div class="row">
        <div class="col-md-8">
        {% block body %}{% endblock %}
        </div>
        <div class="col-md-4">
        {% block sidebar %}{% endblock %}
        </div>
      </div>
      {% endblock %}
    </div>
    {% endblock middle %}

  </div>

  {% block footer %}{% endblock footer %}
    <!-- These four libraries are required for rendering People and Group pages-->
    <script src="{% static "lib/js/jquery.min.js" %}"></script>
    <script src="{% static "lib/js/jquery-ui.min.js" %}"></script>
    <script src="{% static "lib/js/bootstrap.min.js" %}"></script>
    <script src="{% static "lib/js/bootstrap-treeview.js" %}"></script>
    <!-- These two libraries are required for during the submission of a remote service-->
    <script src="{% static "lib/js/underscore.js" %}"></script>
    <script src="{% static "lib/js/bootstrap-typeahead.js" %}"></script>

    <script src="{% static "geonode/js/utils/utils.js" %}"></script>
    <script src="{% static "geonode/js/base/base.js" %}"></script>
    <script type="text/javascript" src="{% url "javascript-catalog" %}"></script>
    {% block extra_script %}{% endblock extra_script %}

  </body>
</html>
